package com.jfm.jfmm.collector.entity.collect.result;

import com.jfm.jfmm.collector.entity.collect.Result;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author DYang
 * @since 2024-10-12 0:24
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class TelnetResult extends Result {

    /**
     * 主机
     */
    private String host;

    /**
     * 端口
     */
    private Integer port;

    /**
     * 延迟
     */
    private long delay;

    /**
     * 结果 0:失败 1:成功
     */
    private int result;

    public static TelnetResult build() {
        return new TelnetResult();
    }

    public TelnetResult host(String host) {
        this.host = host;
        return this;
    }

    public TelnetResult port(Integer port) {
        this.port = port;
        return this;
    }

    public TelnetResult result(int result) {
        this.result = result;
        return this;
    }

    public TelnetResult delay(long delay) {
        this.delay = delay;
        return this;
    }
}
